package com.dao;

import com.pojo.Student;

import java.util.ArrayList;

/**
 * @author 陈Ser
 * @ClassName removeStudent
 * @description: TODO
 * @Date 2021/9/10 14:41
 * @Version 1.0
 */
public class removeStudent {
    public boolean remove(ArrayList<Student> arrayList, Student student) {
        arrayList.remove(student);
        return true;
    }

    public boolean remove(ArrayList<Student> arrayList, Student[] students) {
        for (Student student :
                students) {
            arrayList.remove(student);
        }
        return true;
    }

    public boolean remove(ArrayList<Student> arrayList, String sid) {
        for (int i = 0; i < arrayList.size(); i++) {
            if (arrayList.get(i).getSid().equals(sid)) {
                arrayList.remove(i);
                i--;
            }
        }
        return true;
    }
}
